import Vue from 'vue'
import Router from 'vue-router'
// 导入路由所需要的组件
import Home from "../components/Home"
import Login from "../components/Login";
import Register from "../components/Register";
import FindPassword from "../components/FindPassword";
import ResetPassword from "../components/ResetPassword";
import PhonePassword from "../components/PhonePassword";
import SmsResetPassword from "../components/SmsResetPassword";
import QQCallBack from "../components/QQCallBack";
import Write from "../components/Write";
import Writed from "../components/Writed";
import Article from "../components/Article";
import Wallet from "../components/Wallet";
Vue.use(Router);

// 配置路由的列表
export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name:'Home',
      component:Home,
    },
    {
      name:"Home",
      path:"/home",
      component:Home,
    },
    {
      name:"Login",
      path:"/user/login",
      component:Login,
    },
    {
      name:"Register",
      path:"/user/Register",
      component:Register,
    },
    {
      name:"FindPassword",
      path:"/find_password",
      component:FindPassword,
    },
    {
      name:"ResetPassword",
      path:"/reset_password",
      component:ResetPassword,
    },
    {
      name:"PhonePassword",
      path:"/phone_password",
      component:PhonePassword,
    },
    {
      name:"SmsResetPassword",
      path:"/sms_reset_password",
      component:SmsResetPassword,
    },
    {
      name:"QQCallBack",
      path:"/oauth_callback.html",
      component:QQCallBack,
    },
    {
      name:"Write",
      path:"/write",
      component:Write,
    },
    {
      name:"Writed",
      path:"/:id/writed",
      component:Writed,
    },
    {
       name:"Article",
       path:"/article/:id",
       component: Article,
    },
    {
       name:"Wallet",
       path:"/usr/wallet",
       component: Wallet,
     },
  ]
})
